<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        div {
            width: 200px;
            height: 200px;
        }
        .box1 {
            margin: 0 auto 10px;
            background-color: mediumorchid;
        }
        .box2 {
            position: relative;
            left: 50%;
            margin-left: -100px;
            margin-bottom: 10px;
            background-color: mediumturquoise;
        }
        .box3 {
            position: relative;
            left: 50%;
            transform: translateX(-50%);
            background-color: yellowgreen;
        }
    </style>
</head>
<body>
    <div class="box1"></div>
    <div class="box2"></div>
    <div class="box3"></div>
</body>
</html>